import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '接收平台公司(用户表id)',
    align:"center",
    dataIndex: 'platformCompanyId'
   },
   {
    title: '状态(0：未提交，1：待确认，2：已确认，3：退回)',
    align:"center",
    dataIndex: 'type'
   },
   {
    title: '需求计划编号',
    align:"center",
    dataIndex: 'demandPlanCode'
   },
   {
    title: '需求计划类型(0:劳务需求，1设备需求)',
    align:"center",
    dataIndex: 'demandPlanType'
   },
   {
    title: '提报人',
    align:"center",
    dataIndex: 'reportingUserName'
   },
   {
    title: '提报人联系方式',
    align:"center",
    dataIndex: 'reportingUserTel'
   },
   {
    title: '提报单位',
    align:"center",
    dataIndex: 'reportingUnit'
   },
   {
    title: '平台公司',
    align:"center",
    dataIndex: 'platformCompany'
   },
   {
    title: '关联项目（取字典表sys_dict_item的id）',
    align:"center",
    dataIndex: 'relatedProject'
   },
   {
    title: '需求备注',
    align:"center",
    dataIndex: 'demandRemark'
   },
   {
    title: '劳务需求表/设备需求表demand_order_id',
    align:"center",
    dataIndex: 'demandOrderId'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '接收平台公司(用户表id)',
    field: 'platformCompanyId',
    component: 'Input',
  },
  {
    label: '状态(0：未提交，1：待确认，2：已确认，3：退回)',
    field: 'type',
    component: 'InputNumber',
  },
  {
    label: '需求计划编号',
    field: 'demandPlanCode',
    component: 'Input',
  },
  {
    label: '需求计划类型(0:劳务需求，1设备需求)',
    field: 'demandPlanType',
    component: 'InputNumber',
  },
  {
    label: '提报人',
    field: 'reportingUserName',
    component: 'Input',
  },
  {
    label: '提报人联系方式',
    field: 'reportingUserTel',
    component: 'InputNumber',
  },
  {
    label: '提报单位',
    field: 'reportingUnit',
    component: 'Input',
  },
  {
    label: '平台公司',
    field: 'platformCompany',
    component: 'Input',
  },
  {
    label: '关联项目（取字典表sys_dict_item的id）',
    field: 'relatedProject',
    component: 'Input',
  },
  {
    label: '需求备注',
    field: 'demandRemark',
    component: 'Input',
  },
  {
    label: '劳务需求表/设备需求表demand_order_id',
    field: 'demandOrderId',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];


// 高级查询数据
export const superQuerySchema = {
  platformCompanyId: {title: '接收平台公司(用户表id)',order: 0,view: 'text', type: 'string',},
  type: {title: '状态(0：未提交，1：待确认，2：已确认，3：退回)',order: 1,view: 'number', type: 'number',},
  demandPlanCode: {title: '需求计划编号',order: 2,view: 'text', type: 'string',},
  demandPlanType: {title: '需求计划类型(0:劳务需求，1设备需求)',order: 3,view: 'number', type: 'number',},
  reportingUserName: {title: '提报人',order: 4,view: 'text', type: 'string',},
  reportingUserTel: {title: '提报人联系方式',order: 5,view: 'number', type: 'number',},
  reportingUnit: {title: '提报单位',order: 6,view: 'text', type: 'string',},
  platformCompany: {title: '平台公司',order: 7,view: 'text', type: 'string',},
  relatedProject: {title: '关联项目（取字典表sys_dict_item的id）',order: 8,view: 'text', type: 'string',},
  demandRemark: {title: '需求备注',order: 9,view: 'text', type: 'string',},
  demandOrderId: {title: '劳务需求表/设备需求表demand_order_id',order: 10,view: 'text', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
// 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}